package com.khadi.testcase.util;

import javax.swing.ImageIcon;

import org.openqa.selenium.WebDriver;

public class UIHelper {

	public static final String IMG_QUESTION_MARK = "../view/images/question_mark.jpg";
	public static final String IMG_RIGHT_ARROW_MARK = "../view/images/next24.png";
	public static final String IMG_ARROW_DOWN = "../view/images/arrow_down.gif";
	public static final String IMG_ARROW_UP = "../view/images/arrow_up.gif";
	public static final String ICON_SORT = "../view/images/ico_sort.gif";

	public static WebDriver getWebDriver() {
		return (WebDriver) SessionUtil.getInstance().getSessionMap().get(
				SessionUtil.WEB_DRIVER);
	}

	public static ImageIcon getImageIcon(String path) {
		java.net.URL imgURL = UIHelper.class.getResource(path);
		if (imgURL != null) {
			return new ImageIcon(imgURL);
		} else {
			System.err.println("Couldn't find file: " + path);
			return null;
		}

	}

}
